<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>

<jsp:include page="/public/template/header.jsp" />


<style type="text/css">
input.text {
	width: 400px;
}

input.button {
	width: 80px;
}

table,td,tr,th {
	border-style: solid;
	border-width: 0px;
	border-color: black;
	margin: 0;
	border-collapse: collapse;
	padding: 6px;
}

#content {
	padding: 10px;
}
</style>


<div id="content">





	<h1>WebHook: Edit a WebHook</h1>

	<form action="<c:url value='/config/webHooks/update'/>" method="post">
		<div style="position: absolute; top: 150px; width: 450px;">

			<input type="hidden" value="${webhook.id}" name="ew.id" />
			<table style="position: absolute; width: 90%">

				<tr>
					<td>URL:</td>
					<td><input value="${webhook.url}" name="ew.url"
						type="text" style="width: 400px" /></td>
				</tr>

				<tr>
					<td>Return Type:</td>
					<td><select name="ew.returnType">
							<c:choose>
								<c:when test="${webhook.returnType eq 'xml'}">
									<option selected value="xml">XML</option>
									<option value="json">JSON</option>
									<option value="csv">CSV</option>
								</c:when>
								<c:when test="${webhook.returnType eq 'json'}">
									<option value="xml">XML</option>
									<option selected value="json">JSON</option>
									<option value="csv">CSV</option>
								</c:when>
								<c:when test="${webhook.returnType eq 'csv'}">
									<option value="xml">XML</option>
									<option value="json">JSON</option>
									<option selected value="csv">CSV</option>
								</c:when>
							</c:choose>

					</select></td>

				</tr>

				<tr>
					<td>Description:</td>
					<td><input value="${webhook.sourceDescription}" name="ew.sourceDescription"
						type="text" value="20" style="width: 400px"/></td>
				</tr>

				<tr>
					<td><input type="submit" value="Edit" style="width: 150px;" /></td>
				</tr>
			</table>

		</div>


	</form>


</div>



<script type="text/javascript">
	$(function() {
	});
</script>


<jsp:include page="/public/template/footer.jsp" />
